<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<script type="text/javascript">
	window.onload=function(){
		box = document.getElementById('box');
		width = window.getComputedStyle ? window.getComputedStyle(box,null).width :box.currentStyle.width;
		height = window.getComputedStyle ? window.getComputedStyle(box,null).height :box.currentStyle.height;
		// width=parseInt(width);
		// height=parseInt(height);
		// alert(width);
		box.onmouseover  =function(){
			box.style.width='250px';
			box.style.height='250px';
		}
		box.onmouseout =function(){
			
			box.style.width='300px';
			box.style.height='300px';
		}
		lei=document.getElementsByClassName('lei');
		// x=lei[0].getAttribute('class');
		// // alert(x);
		// ll=lei[0].setAttribute('name','xbs');
		// alert(ll);
		// x=lei[0].getAttribute('name');
		// alert(x);
	}


	</script>
	<title>练习</title>
	<style type="text/css">
	#box{
		width: 500px;
		height: 500px;
		background: red url() 0 0 no-repeat;
	}

	</style>
</head>
<body>
	<div id="box" class="lei" ></div>
</body>
</html>